package com.hurt.competition.admin.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hurt.competition.admin.dto.TeacherReq;
import com.hurt.competition.admin.mapper.TeacherMapper;
import com.hurt.competition.admin.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherMapper teacherMapper;
    @Override
    public IPage<TeacherReq> findAll(Page<TeacherReq> page) {
        return teacherMapper.findAll(page);
    }

    @Override
    public TeacherReq findById(Integer id) {
        return teacherMapper.findById(id);
    }

    @Override
    public int deleteById(Integer id) {
        return teacherMapper.deleteById(id);
    }

    @Override
    public int update(TeacherReq teacher) {
        return teacherMapper.update(teacher);
    }
}
